package com.jl.jlapp.adapter;

import android.graphics.Color;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jl.jlapp.R;
import com.jl.jlapp.eneity.ClassificationModel;

import java.util.List;
import java.util.Map;

public class SideslipClassifityAdapter
  extends BaseQuickAdapter<ClassificationModel.ResultDataBean.TwoClassificationsBean, BaseViewHolder>
{
  Map<String, Object> checkedClassifity;
  
  public SideslipClassifityAdapter(@LayoutRes int paramInt, @Nullable List<ClassificationModel.ResultDataBean.TwoClassificationsBean> paramList)
  {
    super(paramInt, paramList);
  }
  
  protected void convert(BaseViewHolder paramBaseViewHolder, ClassificationModel.ResultDataBean.TwoClassificationsBean paramTwoClassificationsBean)
  {
    paramBaseViewHolder.setText(R.id.brand_name, paramTwoClassificationsBean.getOneClassificationsName() + "/" + paramTwoClassificationsBean.getName());
    paramBaseViewHolder.setText(R.id.classifity_id, paramTwoClassificationsBean.getId() + "");
    Log.d("aaaaaaaaaaa", "分类Id:" + paramTwoClassificationsBean.getId());
    TextView localTextView = (TextView)paramBaseViewHolder.getView(R.id.brand_name);
    RelativeLayout localRelativeLayout = (RelativeLayout)paramBaseViewHolder.getView(R.id.check_brand_relativelayout);
    ImageView ivCheckmark = (ImageView)paramBaseViewHolder.getView(R.id.brand_checkmark);
    localRelativeLayout.setBackgroundResource(R.drawable.goods_check_button_xs);
    ivCheckmark.setVisibility(View.GONE);
    localTextView.setTextColor(Color.parseColor("#333333"));
    if ((this.checkedClassifity != null) && ((paramTwoClassificationsBean.getOneClassificationsName() + "/" + paramTwoClassificationsBean.getName()).equals(this.checkedClassifity.get("classifityName"))) && (paramTwoClassificationsBean.getId() == ((Integer)this.checkedClassifity.get("classifityId")).intValue()))
    {
      localRelativeLayout.setBackgroundResource(R.drawable.goods_check_button_xs_checked);
      ivCheckmark.setVisibility(View.VISIBLE);
      localTextView.setTextColor(Color.parseColor("#60b746"));
    }
  }
  
  public void setCheckedClassifity(Map<String, Object> paramMap)
  {
    this.checkedClassifity = paramMap;
  }
}


/* Location:              /Users/davidzhang/Documents/decompileApk/jlfood-dex2jar.jar!/com/jl/jlapp/adapter/SideslipClassifityAdapter.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */